package cn.kkcxy.blog.common.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @BelongsProject: kkcxy-blog
 * @BelongsPackage: cn.kkcxy.blog.common.properties
 * @Author: kkcxy
 * @CreateTime: 2024-09-09 01:40
 * @Description: 登录类型 - Key配置 (Redis)
 * @Version: 1.0
 */
@Data
@Component
@ConfigurationProperties(prefix = "login.type.key")
public class LoginTypeKeysProperties {

    /**
     * 账号 key
     */
    private String accountKey;

    /**
     * 邮箱 key
     */
    private String emailKey;

    /**
     * 手机 key
     */
    private String phoneKey;

    /**
     * 微信 key
     */
    private String wechatKey;

    /**
     * 构建 Key
     */
    public String buildKey(String... keyArgs) {
        return String.join(":", keyArgs);
    }

}
